package com.heima.admin.service.impl;

import com.heima.admin.service.SensitiveService;
import com.heima.apis.wemedia.IWemediaClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
@Slf4j
public class SensitiveServiceImpl implements SensitiveService {

    @Autowired
    private IWemediaClient iWemediaClient;

    /**
     * 删除敏感词
     * @param id
     * @return
     */

    @Override
    public ResponseResult delSensitive(Integer id) {
        return iWemediaClient.delSensitive(id);
    }

    /**
     * 查询所有
     * @param dto
     * @return
     */

    @Override
    public ResponseResult findList(SensitiveDto dto) {
        return iWemediaClient.findList(dto);
    }

    /**
     * 保存
     * @param dto
     * @return
     */
    @Override
    public ResponseResult save(WmSensitive dto) {
        return iWemediaClient.save(dto);
    }

    /**
     * 修改
     * @param dto
     * @return
     */
    @Override
    public ResponseResult update(WmSensitive dto) {
        return iWemediaClient.update(dto);
    }
}
